/**
 * 获取刷新验证码
 */
function getCode(){
    document.getElementById("code").src="verifyCode?timestamp=" + (new Date()).toTimeString();
}

layui.use('form', function(){
    var form = layui.form;
    //监听提交
    form.on('submit(login)', function(data){
        //对密码进行加密并重新赋值
        form.val('login-form', {
            "password": getSM3Hash(data.field.password),
        })
        return true;
    });
});